import traceback
from django.shortcuts import render

# Create your views here.
from django.db.models import Q
from rest_framework import permissions
from rest_framework.response import Response
from rest_framework.decorators import action
from rest_framework.views import APIView
from rest_framework import generics, mixins, views

# Create your views here.
from asgiref.sync import async_to_sync
from channels.layers import get_channel_layer
channel_layer = get_channel_layer()


class CreateChatNo(generics.GenericAPIView):
    """
    创建聊天群号
    """
    def post(self, request):
        user = request.user
        group_id = user.id
        return Response({'code': 200, 'group_id': group_id})

